package lexicalUnit;

import chalmersbot.Absyn.AuxiliaryVerb;
import chalmersbot.Absyn.AuxVerb.Visitor;

public class CheckAuxVerb implements Visitor<String, Environ> {

	@Override
	public String visit(AuxiliaryVerb p, Environ env) {
		if (p.auxiliarytoken_.compareTo("did")==0){
			env.setVerbTense(Environ.PAST_TENSE);
			env.setFlag(Environ.AUX_VERB);
		}
		else if (p.auxiliarytoken_.compareTo("does")==0){
			env.setFlag(Environ.AUX_VERB);
			env.setVerbTense(Environ.THRID_PERSON);
		}else if (p.auxiliarytoken_.compareTo("do")==0)
			env.setFlag(Environ.AUX_VERB);
		else if (p.auxiliarytoken_.compareTo("are")==0){
			env.setSingular("are", "is");
			env.setPlural("is", "are");
		}
		return p.auxiliarytoken_;
	}

}
